package cn.jari.erp.inventory.convert;

import com.csicit.ace.jpaleaf.repository.AbstractJpaDataObjectFactory;
import lombok.RequiredArgsConstructor;
import org.mapstruct.ObjectFactory;
import org.springframework.stereotype.Component;
import cn.jari.erp.inventory.dto.InventoryCategoryReference;
import cn.jari.erp.inventory.entities.primary.InventoryCategory;
import cn.jari.erp.inventory.dto.UpdateInventoryCategoryCommand;
import cn.jari.erp.inventory.dto.DeleteInventoryCategoryCommand;
import cn.jari.erp.inventory.entities.primary.InventoryItem;
import cn.jari.erp.inventory.dto.DeleteInventoryItemCommand;
import cn.jari.erp.inventory.dto.InventoryItemReference;
import cn.jari.erp.inventory.dto.UpdateInventoryItemCommand;

/*
 * 警告：代码由鲲舟平台生成，请勿手动修改。
 * Warn: This class file is generated by JARI-ACE platform, please do not modify manually。
 */

/**
 * MapStruct 业务对象工厂
 *
 * @author JARI-ACE
 */
@Component
@RequiredArgsConstructor
public class MappingObjectFactory extends AbstractJpaDataObjectFactory {
    /**
    * 根据InventoryCategoryReference加载InventoryCategory
    */
    @ObjectFactory
    public InventoryCategory loadBy(InventoryCategoryReference dto) {
       return load(dto, InventoryCategory.class);
    }
    /**
    * 根据InventoryItemReference加载InventoryItem
    */
    @ObjectFactory
    public InventoryItem loadBy(InventoryItemReference dto) {
       return load(dto, InventoryItem.class);
    }
    /**
    * 根据UpdateInventoryCategoryCommand加载InventoryCategory
    */
    @ObjectFactory
    public InventoryCategory loadBy(UpdateInventoryCategoryCommand dto) {
       return load(dto, InventoryCategory.class);
    }
    /**
    * 根据DeleteInventoryCategoryCommand加载InventoryCategory
    */
    @ObjectFactory
    public InventoryCategory loadBy(DeleteInventoryCategoryCommand dto) {
       return load(dto, InventoryCategory.class);
    }
    /**
    * 根据UpdateInventoryItemCommand加载InventoryItem
    */
    @ObjectFactory
    public InventoryItem loadBy(UpdateInventoryItemCommand dto) {
       return load(dto, InventoryItem.class);
    }
    /**
    * 根据DeleteInventoryItemCommand加载InventoryItem
    */
    @ObjectFactory
    public InventoryItem loadBy(DeleteInventoryItemCommand dto) {
       return load(dto, InventoryItem.class);
    }
}
